package com.zxy.config;

import feign.Logger;
import feign.Request;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

//@Configuration
public class FeignConfig {
    @Bean
    Logger.Level feignLoggerLevel(){
        return Logger.Level.FULL;
    }

    @Bean
    public Request.Options options(){
        //connectTimeout 连接超时，默认是10s
        //readTimeout 读取超时，默认是60s
        return new Request.Options(5L, TimeUnit.SECONDS,10L,TimeUnit.SECONDS,true);
    }
}
